﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Dust.AbpProject.Tasks;

namespace Dust.AbpProject.EntityFrameworkCore.Seed
{


    public class DefaultTestDataForTask
    {
        private static readonly List<Task> _tasks;
        private readonly AbpProjectDbContext _context;
        public DefaultTestDataForTask(AbpProjectDbContext context)
        {
            _context = context;
        }
        static DefaultTestDataForTask()
        {
            _tasks = new List<Task>()
            {
                new Task("Learning ABP deom", "Learning how to use abp framework to build a MPA application."),
                new Task("Make Lunch", "Cook 2 dishs")
            };
        }

        public void Create()
        {
            _context.Tasks.AddRange(_tasks);
            _context.SaveChanges();
        }
    }
}
